package com.xpsoft.oa.dao.admin.impl;


import org.hibernate.Query;

import com.xpsoft.core.dao.impl.BaseDaoImpl;
import com.xpsoft.oa.dao.admin.AdminArticleSendDao;
import com.xpsoft.oa.model.admin.AdminArticleSend;

public class AdminArticleSendDaoImpl extends BaseDaoImpl<AdminArticleSend> implements AdminArticleSendDao{

	public AdminArticleSendDaoImpl() {
		super(AdminArticleSend.class);
	}

	@Override
	public String getMaxNo(String search) {
		String hql = "select artileNo from AdminArticleSend where artileNo like "+"'%"+search+"%'"+" order by artileNo desc";
		Query query = getSession().createQuery(hql);
		String contractNo = (String)query.setFirstResult(0).setMaxResults(1).setFetchSize(1).uniqueResult();
		return contractNo;
	}

}